The present invention relates to an automatic gain control apparatus that compensates for transmission loss in a communication system such as a telephone communication system.
In many telephone communication systems, speech signals are transmitted in digital form within the switching apparatus of the system, and in analog form between the switching apparatus and the telephone sets to which the switching apparatus is connected. Automatic gain control (AGC) is used to compensate for various types of loss that occur in analog transmission.
One type of loss is an insertion loss caused by the two-wire analog line connecting a telephone set to the switching apparatus. Another type of loss is an echo return loss that occurs in the so-called hybrid circuit that interfaces the two-wire line to the four-wire line used in the switching apparatus. Both types of loss tend to vary from line to line and from call to call, and are difficult to predict in advance.
A known method of automatic gain control detects insertion loss on the two-wire line by measuring the amplitude or power level of the speech signal received from the telephone set, and amplifies the speech signal sent toward the telephone set by an amount sufficient to compensate for the detected insertion loss and an assumed echo return loss. The assumed echo return loss may be zero. The amplification is performed digitally, before the speech signal passes through the hybrid circuit. If line conditions vary during a call, the amplification factor or gain is adjusted to compensate for the variations.
One problem in this method is that the actual echo return loss may differ considerably from the assumed echo return loss. Consequently, the signal reaching the telephone set may have an undesirably high or low level.
Another problem is that the insertion loss cannot be detected until a speech signal is received from the telephone set. Until such a speech signal is received, the AGC apparatus operates at a default setting, e.g. with unity gain. In the worst case, when the insertion loss and echo return loss are both large, and the party at the other end of the communication link speaks at length before the party at the telephone set in question speaks at all, the latter party may have to listen to an extended interval of speech that is too faint to be heard easily.
A further problem is that by amplifying the speech signal supplied to the hybrid circuit, the AGC apparatus also amplifies the echo that returns from the hybrid circuit to the outgoing pair of wires in the four-wire line. Many telephone switching systems use echo cancelers to remove this unwanted echo. Each time the AGC apparatus adjusts its gain, the echo canceler must adjust to a new echo level. Echo-canceling performance is degraded during the adjustment period. Echo cancellation may even become impossible, if the echo canceler is implemented on a digital signal processor (DSP) of the type that performs fixed-point arithmetic, and the AGC apparatus amplifies the echo to a level higher than the maximum fixed-point output value of the DSP.
An object of the present invention is to provide an automatic gain control method and apparatus that take correct account of echo return loss in an interface between a four-wire line and a two-wire line.
Another object of the invention is to provide an automatic gain control method and apparatus that do not interfere with echo cancellation.
The invented automatic gain control method is applicable in a communication system having a circuit that interfaces a two-wire line to a four-wire line. The method comprises the steps of:
measuring the levels of an incoming signal on the incoming path of the four-wire line, and the echo of the incoming signal reflected by the interface circuit onto the outgoing path of the four-wire line, thereby determining the echo return loss;
calculating a gain from the echo return loss; and
amplifying the incoming signal by the calculated gain before transmission through the interface circuit to the two-wire line, thereby compensating for the echo return loss.
As a further step, the outgoing signal on the outgoing path of the four-wire line may be attenuated to suppress the echo.
Alternatively, the communication system may have an echo canceler that generates an echo replica from the incoming signal and subtracts the echo replica from the outgoing signal. The invention provides several methods of shielding the echo canceler from the effects of automatic gain control, such as: attenuating the outgoing signal according to the gain applied to the incoming signal; amplifying the echo replica, and attenuating the outgoing signal for feedback to the echo canceler; or subtracting an amplified echo replica signal from an amplified outgoing signal for output to the far end of the communication link, and subtracting a non-amplified echo replica signal from a non-amplified outgoing signal for feedback to the echo canceler.
The invention also provides automatic gain control apparatus employing the above methods.